Make WordPress Core

Ticket #23668: emptytax.diff

File emptytax.diff, 570 bytes (added by cliffseal, 12 years ago)

Check for empty string in slug

  • wp-includes/taxonomy.php

     
    343343        }
    344344
    345345        if ( false !== $args['rewrite'] && ( is_admin() || '' != get_option('permalink_structure') ) ) {
     346               if ( empty( $args['rewrite']['slug'] ) )
     347                   $args['rewrite']['slug'] = $taxonomy;
    346348                $args['rewrite'] = wp_parse_args($args['rewrite'], array(
    347349                        'slug' => sanitize_title_with_dashes($taxonomy),
    348350                        'with_front' => true,