Make WordPress Core

Ticket #23668: 23668.patch

File 23668.patch, 800 bytes (added by SergeyBiryukov, 12 years ago)
  • wp-includes/taxonomy.php

     
    344344        }
    345345
    346346        if ( false !== $args['rewrite'] && ( is_admin() || '' != get_option('permalink_structure') ) ) {
    347                 $args['rewrite'] = wp_parse_args($args['rewrite'], array(
    348                         'slug' => sanitize_title_with_dashes($taxonomy),
     347                if ( empty( $args['rewrite']['slug'] ) )
     348                        $args['rewrite']['slug'] = sanitize_title_with_dashes( $taxonomy );
     349                $args['rewrite'] = wp_parse_args( $args['rewrite'], array(
    349350                        'with_front' => true,
    350351                        'hierarchical' => false,
    351352                        'ep_mask' => EP_NONE,
    352                 ));
     353                ) );
    353354
    354355                if ( $args['hierarchical'] && $args['rewrite']['hierarchical'] )
    355356                        $tag = '(.+?)';