mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-22 23:41:38 +01:00
Taxonomy rewrite generation when turning on permalinks, r18443 for taxonomies. Props SergeyBiryukov. Fixes #19794.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19930 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b7dd19a963
commit
ecdac4be4f
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user