[wp-hackers] Best way to allow slug rewrite of CPT via i18n

Nicholas Ciske nl at thoughtrefinery.com
Tue Nov 26 21:52:48 UTC 2013


You probably want to run it through sanitize_title before you attempt to use it... lest a wily translator blow up your permalinks ;-)

http://codex.wordpress.org/Function_Reference/sanitize_title
_________________________
Nick Ciske
http://thoughtrefinery.com/
@nciske	

On Nov 26, 2013, at 3:48 PM, Tom Barrett wrote:

> Hello
> 
> What is the best way to allow the of a custom post type to change via
> translation.
> 
> I'm currently doing this:
>   'rewrite'  => array( 'slug' => __( 'glossary', WPG_TEXTDOMAIN ) ),
> 
> Is that good?
> 
> Thanks!
> -- 
> http://www.tcbarrett.com | http://gplus.to/tcbarrett |
> http://twitter.com/tcbarrett



More information about the wp-hackers mailing list