Don't call sanitize_title_with_dashes( $taxonomy )
in register_taxonomy()
unless $args['rewrite']['slug']
is empty.
Props SergeyBiryukov. Fixes #23668. git-svn-id: https://develop.svn.wordpress.org/trunk@25335 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0c0c81d81c
commit
3ee8135baa
@ -352,8 +352,9 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
|
||||
}
|
||||
|
||||
if ( false !== $args['rewrite'] && ( is_admin() || '' != get_option( 'permalink_structure' ) ) ) {
|
||||
if ( empty( $args['rewrite']['slug'] ) )
|
||||
$args['rewrite']['slug'] = sanitize_title_with_dashes( $taxonomy );
|
||||
$args['rewrite'] = wp_parse_args( $args['rewrite'], array(
|
||||
'slug' => sanitize_title_with_dashes( $taxonomy ),
|
||||
'with_front' => true,
|
||||
'hierarchical' => false,
|
||||
'ep_mask' => EP_NONE,
|
||||
|
Loading…
Reference in New Issue
Block a user