Taxonomy rewrite generation when turning on permalinks, r18443 for taxonomies. Props SergeyBiryukov. Fixes #19794.

git-svn-id: https://develop.svn.wordpress.org/trunk@19930 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jon Cave 2012-02-15 17:30:37 +00:00
parent 6792ef3018
commit 35eae452e8
1 changed files with 1 additions and 1 deletions

View File

@ -330,7 +330,7 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
$wp->add_query_var($args['query_var']);
}
if ( false !== $args['rewrite'] && '' != get_option('permalink_structure') ) {
if ( false !== $args['rewrite'] && ( is_admin() || '' != get_option('permalink_structure') ) ) {
$args['rewrite'] = wp_parse_args($args['rewrite'], array(
'slug' => sanitize_title_with_dashes($taxonomy),
'with_front' => true,