Skip to content

Instantly share code, notes, and snippets.

/wp-travel-customize
Created Feb 15, 2018

Embed
What would you like to do?
add_filter( 'gettext', 'wp_travel_customized_itineraries_string_translation', 20, 3 );
/**
* Change comment form default field names.
*
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
*/
function wp_travel_customized_itineraries_string_translation( $translated_text, $text, $domain ) {
if ( ! defined( 'WP_TRAVEL_POST_TYPE' ) ) {
return $translated_text;
}
if ( is_singular( WP_TRAVEL_POST_TYPE ) ) {
switch ( $translated_text ) {
case 'Itineraries' :
$translated_text = __( 'Itinerary', 'wp-travel' );
break;
}
}
return $translated_text;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.