Created
December 4, 2015 12:17
-
-
Save barrykooij/12fc9184f96dadb08f60 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WP Car Manager change slug - Add this to your theme's functions.php | |
function wpcm_change_slug( $translated, $text, $context, $domain ) { | |
if ( 'wp-car-manager' == $domain ) { | |
if ( 'vehicle' == $text && 'post type slug' == $context ) { | |
$translated = 'my-cars'; // change slug of vehicle | |
} | |
} | |
return $translated; | |
} | |
add_filter( 'gettext_with_context', 'wpcm_change_slug', 10, 4 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment