WordPress.org

Make WordPress Core

Changeset 25335


Ignore:
Timestamp:
09/11/2013 12:08:04 AM (8 years ago)
Author:
wonderboymusic
Message:

Don't call sanitize_title_with_dashes( $taxonomy ) in register_taxonomy() unless $args['rewrite']['slug'] is empty.

Props SergeyBiryukov.
Fixes #23668.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/taxonomy.php

    r25334 r25335  
    353353
    354354    if ( false !== $args['rewrite'] && ( is_admin() || '' != get_option( 'permalink_structure' ) ) ) {
     355        if ( empty( $args['rewrite']['slug'] ) )
     356            $args['rewrite']['slug'] = sanitize_title_with_dashes( $taxonomy );
    355357        $args['rewrite'] = wp_parse_args( $args['rewrite'], array(
    356             'slug' => sanitize_title_with_dashes( $taxonomy ),
    357358            'with_front' => true,
    358359            'hierarchical' => false,
Note: See TracChangeset for help on using the changeset viewer.